#define LED 2
#define BUTTON1 14
#define BUTTON2 12
#define BUTTON3 13
#define BUTTON4 5

int val1 = 0;
int val2 = 0;
int val3 = 0;
int val4 = 0;

void setup() {
  // put your setup code here, to run once:
 	  pinMode(LED, OUTPUT); 
  	pinMode(BUTTON1, INPUT_PULLUP);
    pinMode(BUTTON2, INPUT_PULLUP);
    pinMode(BUTTON3, INPUT_PULLUP);
    pinMode(BUTTON4, INPUT_PULLUP);
    digitalWrite(LED, LOW);
    Serial.begin(115200);
    Serial.println();
}

void loop() {
  // put your main code here, to run repeatedly:
  val1 = digitalRead(BUTTON1);  // 获取按钮是否被按下的状态
  val2 = digitalRead(BUTTON2);
  val3 = digitalRead(BUTTON3);
  val4 = digitalRead(BUTTON4);
 	if (val1 == 0){
      digitalWrite(LED, LOW);
 	    Serial.println("Btn 1");
      delay(300);
  	}
  if (val2 == 0){
      digitalWrite(LED, LOW);
 	    Serial.println("Btn 2");
      delay(300);
  	}
  if (val3 == 0){
      digitalWrite(LED, LOW);
 	    Serial.println("Btn 3");
      delay(300);
  	}
  if (val4 == 0){
      digitalWrite(LED, LOW);
 	    Serial.println("Btn 4");
      delay(300);
  	}
    
}
